This notebook shows all histograms of all the data present that we need to use
total_datasetcols =['mu_plus_MC15TuneV1_ProbNNk', 'mu_plus_MC15TuneV1_ProbNNpi',
'mu_plus_MC15TuneV1_ProbNNmu', 'mu_plus_MC15TuneV1_ProbNNe',
'mu_plus_MC15TuneV1_ProbNNp', 'mu_plus_P', 'mu_plus_PT', 'mu_plus_ETA',
'mu_plus_PHI', 'mu_plus_PE', 'mu_plus_PX', 'mu_plus_PY', 'mu_plus_PZ',
'mu_plus_IPCHI2_OWNPV', 'mu_minus_MC15TuneV1_ProbNNk',
'mu_minus_MC15TuneV1_ProbNNpi', 'mu_minus_MC15TuneV1_ProbNNmu',
'mu_minus_MC15TuneV1_ProbNNe', 'mu_minus_MC15TuneV1_ProbNNp',
'mu_minus_P', 'mu_minus_PT', 'mu_minus_ETA', 'mu_minus_PHI',
'mu_minus_PE', 'mu_minus_PX', 'mu_minus_PY', 'mu_minus_PZ',
'mu_minus_IPCHI2_OWNPV', 'K_MC15TuneV1_ProbNNk',
'K_MC15TuneV1_ProbNNpi', 'K_MC15TuneV1_ProbNNmu',
'K_MC15TuneV1_ProbNNe', 'K_MC15TuneV1_ProbNNp', 'K_P', 'K_PT', 'K_ETA',
'K_PHI', 'K_PE', 'K_PX', 'K_PY', 'K_PZ', 'K_IPCHI2_OWNPV',
'Pi_MC15TuneV1_ProbNNk', 'Pi_MC15TuneV1_ProbNNpi',
'Pi_MC15TuneV1_ProbNNmu', 'Pi_MC15TuneV1_ProbNNe',
'Pi_MC15TuneV1_ProbNNp', 'Pi_P', 'Pi_PT', 'Pi_ETA', 'Pi_PHI', 'Pi_PE',
'Pi_PX', 'Pi_PY', 'Pi_PZ', 'Pi_IPCHI2_OWNPV', 'B0_MM',
'B0_ENDVERTEX_CHI2', 'B0_ENDVERTEX_NDOF', 'B0_FDCHI2_OWNPV', 'Kstar_MM',
'Kstar_ENDVERTEX_CHI2', 'Kstar_ENDVERTEX_NDOF', 'Kstar_FDCHI2_OWNPV',
'J_psi_MM', 'J_psi_ENDVERTEX_CHI2', 'J_psi_ENDVERTEX_NDOF',
'J_psi_FDCHI2_OWNPV', 'B0_IPCHI2_OWNPV', 'B0_DIRA_OWNPV', 'B0_OWNPV_X',
'B0_OWNPV_Y', 'B0_OWNPV_Z', 'B0_FD_OWNPV', 'B0_ID', 'q2', 'phi',
'costhetal', 'costhetak', 'polarity', 'year']
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (24,24)
# Uncomment the line below to create high-resolution figures (large!)
#%config InlineBackend.figure_formats = ['svg']
plt.rc("figure", dpi=150)
def plot_df(df_str):
df = pd.read_pickle('data/' + df_str)
df.hist(bins=50)
plt.tight_layout()
plt.show()
plot_df('total_dataset.pkl')
To help you understand the backgrounds present in the real data, simulation samples of some decays are provided as listed below:
Characteristics:
plot_df('signal.pkl')
Characteristics:
plot_df('jpsi.pkl')
with the muon reconstructed as kaon and the kaon reconstructed as a muon
$$ B^0 \rightarrow K^{*0} J/\psi $$plot_df('jpsi_mu_K_swap.pkl')
with the muon reconstructed as pion and the pion reconstructed as a muon
plot_df('jpsi_mu_pi_swap.pkl')
signal decay but with the kaon reconstructed as a pion and the pion reconstructed as a kaon
plot_df('k_pi_swap.pkl')
plot_df('phimumu.pkl')
with the proton reconstructed as a kaon and the kaon reconstructed as a pion
$$ B^0_s \rightarrow pK \mu^+\mu^-$$plot_df('pKmumu_piTok_kTop.pkl')
with the proton reconstructed as a pion
plot_df('pKmumu_piTop.pkl')
plot_df('psi2S.pkl')
In addition you are given a sample of simulation called acceptance.pkl. This is generated to be flat in the three anglular variables $\theta_l$, $\theta_k$, $\phi$ and $q^2$.
Characteristics:
plot_df('acceptance_mc.pkl')
This is some attempt at filtering based on the vertex distances and comparing it to the signal.
fig, ax = plt.subplots(1,2)
ax[0].hist(total[total['B0_FD_OWNPV'] < 20]['B0_FD_OWNPV'], 100)
ax[1].hist(sig[sig['B0_FD_OWNPV'] < 20]['B0_FD_OWNPV'],100)
plt.xlabel('Distance from secondary to primary vertex /mm')
plt.tight_layout()
fig, ax = plt.subplots(1,2)
ax[0].hist(total[total['B0_FD_OWNPV'] < 20]['B0_FD_OWNPV'], 100)
ax[1].hist(sig[sig['B0_FD_OWNPV'] < 20]['B0_FD_OWNPV'],100)
plt.xlabel('Distance from secondary to primary vertex /mm')
plt.tight_layout()